import { createApp } from 'vue'

import App from '@/App.vue'

import '@/styles/index.scss'
import ElementPlus from 'element-plus'
//@ts-ignore忽略当前文件ts类型的检测否则有红色提示(打包会失败)
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import 'element-plus/dist/index.css'
import 'virtual:svg-icons-register'
import router from './router'
//引入自定义插件对象：注册整个项目的全局组件
import gloalComponent from './components'
console.log(gloalComponent)
const app = createApp(App)

app.use(ElementPlus, {
  locale: zhCn,
})
console.log(import.meta.env)
//安装自定义插件
app.use(gloalComponent)
//引入模版的全局的样式
import './styles/index.scss'
import axios from 'axios'
import pinia from './store'

// axios({
//   url: '/api/user/login',
//   method: 'post',
//   data: {
//     username: 'admin',
//     password: '111111',
//   },
// })
//注册模版路由
app.use(router)
app.use(pinia)
//将应用挂载到挂载点上
app.mount('#app')
